# 5.打印1~30所有数的平方的和
a = 1
sum1 = 0
while a <= 30:
    sum1 += a ** 2  # sum1=sum1+ a*a    a*a*a ---->  a**3
    a += 1
print(sum1)
